package com.daoeping.data;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Bzn_jobdescription entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "bzn_jobdescription", catalog = "daoeping")
public class Bzn_jobdescription implements java.io.Serializable {

	// Fields

	private Integer id;
	private Usr_user usr_user;
	private Bsc_workyear bsc_workyear;
	private Bsc_jobtype bsc_jobtype;
	private Bsc_education bsc_education;
	private Bsc_department bsc_department;
	private Bsc_major bsc_major;
	private Bsc_worktype bsc_worktype;
	private Bsc_jobtitle bsc_jobtitle;
	private Cop_companyinfo cop_companyinfo;
	private Bsc_salary bsc_salary;
	private String title;
	private String workPlace;
	private Integer recruitsNum;
	private String description;
	private Date createdDate;
	private Date updateDate;
	private Integer releaseFlag;
	private Integer deleteFlag;
	private Date exceedDate;
	private Set<Bzn_skillref> bzn_skillrefs = new HashSet<Bzn_skillref>(0);
	private Set<Bzn_languageref> bzn_languagerefs = new HashSet<Bzn_languageref>(
			0);
	private Set<Bzn_industryref> bzn_industryrefs = new HashSet<Bzn_industryref>(
			0);
	private Set<Bzn_certificateref> bzn_certificaterefs = new HashSet<Bzn_certificateref>(
			0);

	// Constructors

	/** default constructor */
	public Bzn_jobdescription() {
	}

	/** minimal constructor */
	public Bzn_jobdescription(Usr_user usr_user,
			Cop_companyinfo cop_companyinfo, String title) {
		this.usr_user = usr_user;
		this.cop_companyinfo = cop_companyinfo;
		this.title = title;
	}

	/** full constructor */
	public Bzn_jobdescription(Usr_user usr_user, Bsc_workyear bsc_workyear,
			Bsc_jobtype bsc_jobtype, Bsc_education bsc_education,
			Bsc_department bsc_department, Bsc_major bsc_major,
			Bsc_worktype bsc_worktype, Bsc_jobtitle bsc_jobtitle,
			Cop_companyinfo cop_companyinfo, Bsc_salary bsc_salary,
			String title, String workPlace, Integer recruitsNum,
			String description, Date createdDate, Date updateDate,
			Integer releaseFlag, Integer deleteFlag, Date exceedDate,
			Set<Bzn_skillref> bzn_skillrefs,
			Set<Bzn_languageref> bzn_languagerefs,
			Set<Bzn_industryref> bzn_industryrefs,
			Set<Bzn_certificateref> bzn_certificaterefs) {
		this.usr_user = usr_user;
		this.bsc_workyear = bsc_workyear;
		this.bsc_jobtype = bsc_jobtype;
		this.bsc_education = bsc_education;
		this.bsc_department = bsc_department;
		this.bsc_major = bsc_major;
		this.bsc_worktype = bsc_worktype;
		this.bsc_jobtitle = bsc_jobtitle;
		this.cop_companyinfo = cop_companyinfo;
		this.bsc_salary = bsc_salary;
		this.title = title;
		this.workPlace = workPlace;
		this.recruitsNum = recruitsNum;
		this.description = description;
		this.createdDate = createdDate;
		this.updateDate = updateDate;
		this.releaseFlag = releaseFlag;
		this.deleteFlag = deleteFlag;
		this.exceedDate = exceedDate;
		this.bzn_skillrefs = bzn_skillrefs;
		this.bzn_languagerefs = bzn_languagerefs;
		this.bzn_industryrefs = bzn_industryrefs;
		this.bzn_certificaterefs = bzn_certificaterefs;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "user_id", nullable = false)
	public Usr_user getUsr_user() {
		return this.usr_user;
	}

	public void setUsr_user(Usr_user usr_user) {
		this.usr_user = usr_user;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "work_year_id")
	public Bsc_workyear getBsc_workyear() {
		return this.bsc_workyear;
	}

	public void setBsc_workyear(Bsc_workyear bsc_workyear) {
		this.bsc_workyear = bsc_workyear;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "job_type_id")
	public Bsc_jobtype getBsc_jobtype() {
		return this.bsc_jobtype;
	}

	public void setBsc_jobtype(Bsc_jobtype bsc_jobtype) {
		this.bsc_jobtype = bsc_jobtype;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "education_id")
	public Bsc_education getBsc_education() {
		return this.bsc_education;
	}

	public void setBsc_education(Bsc_education bsc_education) {
		this.bsc_education = bsc_education;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "department_id")
	public Bsc_department getBsc_department() {
		return this.bsc_department;
	}

	public void setBsc_department(Bsc_department bsc_department) {
		this.bsc_department = bsc_department;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "major_id")
	public Bsc_major getBsc_major() {
		return this.bsc_major;
	}

	public void setBsc_major(Bsc_major bsc_major) {
		this.bsc_major = bsc_major;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "work_type_id")
	public Bsc_worktype getBsc_worktype() {
		return this.bsc_worktype;
	}

	public void setBsc_worktype(Bsc_worktype bsc_worktype) {
		this.bsc_worktype = bsc_worktype;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "jobtitle_id")
	public Bsc_jobtitle getBsc_jobtitle() {
		return this.bsc_jobtitle;
	}

	public void setBsc_jobtitle(Bsc_jobtitle bsc_jobtitle) {
		this.bsc_jobtitle = bsc_jobtitle;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "corp_id", nullable = false)
	public Cop_companyinfo getCop_companyinfo() {
		return this.cop_companyinfo;
	}

	public void setCop_companyinfo(Cop_companyinfo cop_companyinfo) {
		this.cop_companyinfo = cop_companyinfo;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "salary_id")
	public Bsc_salary getBsc_salary() {
		return this.bsc_salary;
	}

	public void setBsc_salary(Bsc_salary bsc_salary) {
		this.bsc_salary = bsc_salary;
	}

	@Column(name = "title", nullable = false, length = 200)
	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name = "work_place", length = 200)
	public String getWorkPlace() {
		return this.workPlace;
	}

	public void setWorkPlace(String workPlace) {
		this.workPlace = workPlace;
	}

	@Column(name = "recruits_num")
	public Integer getRecruitsNum() {
		return this.recruitsNum;
	}

	public void setRecruitsNum(Integer recruitsNum) {
		this.recruitsNum = recruitsNum;
	}

	@Column(name = "description", length = 4000)
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "created_date", length = 10)
	public Date getCreatedDate() {
		return this.createdDate;
	}

	public void setCreatedDate(Date createdDate) {
		this.createdDate = createdDate;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "update_date", length = 10)
	public Date getUpdateDate() {
		return this.updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}

	@Column(name = "release_flag")
	public Integer getReleaseFlag() {
		return this.releaseFlag;
	}

	public void setReleaseFlag(Integer releaseFlag) {
		this.releaseFlag = releaseFlag;
	}

	@Column(name = "delete_flag")
	public Integer getDeleteFlag() {
		return this.deleteFlag;
	}

	public void setDeleteFlag(Integer deleteFlag) {
		this.deleteFlag = deleteFlag;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "exceed_date", length = 10)
	public Date getExceedDate() {
		return this.exceedDate;
	}

	public void setExceedDate(Date exceedDate) {
		this.exceedDate = exceedDate;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "bzn_jobdescription")
	public Set<Bzn_skillref> getBzn_skillrefs() {
		return this.bzn_skillrefs;
	}

	public void setBzn_skillrefs(Set<Bzn_skillref> bzn_skillrefs) {
		this.bzn_skillrefs = bzn_skillrefs;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "bzn_jobdescription")
	public Set<Bzn_languageref> getBzn_languagerefs() {
		return this.bzn_languagerefs;
	}

	public void setBzn_languagerefs(Set<Bzn_languageref> bzn_languagerefs) {
		this.bzn_languagerefs = bzn_languagerefs;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "bzn_jobdescription")
	public Set<Bzn_industryref> getBzn_industryrefs() {
		return this.bzn_industryrefs;
	}

	public void setBzn_industryrefs(Set<Bzn_industryref> bzn_industryrefs) {
		this.bzn_industryrefs = bzn_industryrefs;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "bzn_jobdescription")
	public Set<Bzn_certificateref> getBzn_certificaterefs() {
		return this.bzn_certificaterefs;
	}

	public void setBzn_certificaterefs(
			Set<Bzn_certificateref> bzn_certificaterefs) {
		this.bzn_certificaterefs = bzn_certificaterefs;
	}

}